import { BargainCfgBase } from "./Sheets"
import { SheetManager } from "../../ccc3-framework-core/framework/modules/sheetManager";
export class BargainCfg extends BargainCfgBase {
  //id索引
  public static get(id: any) {
    if ((this as any)[id]) return (this as any)[id];
    return SheetManager.get("BargainCfg", id, BargainCfg);
  }
  public static getAll(): BargainCfg[] {
    return SheetManager.getAllSheets("BargainCfg", BargainCfg);
  }

  public static getRandom(): BargainCfg {
    var all = this.getAll();
    var find = all[Math.floor(Math.random() * all.length)];
    return find;
  }
}